Optimal. Leaf size=51 \[ \frac{a^2 \log (\sin (e+f x))}{f}-\frac{(a+b)^2 \csc ^4(e+f x)}{4 f}+\frac{a (a+b) \csc ^2(e+f x)}{f} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0865154, antiderivative size = 51, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 23, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.13, Rules used = {4138, 444, 43} \[ \frac{a^2 \log (\sin (e+f x))}{f}-\frac{(a+b)^2 \csc ^4(e+f x)}{4 f}+\frac{a (a+b) \csc ^2(e+f x)}{f} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 4138
Rule 444
Rule 43
Rubi steps
\begin{align*} \int \cot ^5(e+f x) \left (a+b \sec ^2(e+f x)\right )^2 \, dx &=-\frac{\operatorname{Subst}\left (\int \frac{x \left (b+a x^2\right )^2}{\left (1-x^2\right )^3} \, dx,x,\cos (e+f x)\right )}{f}\\ &=-\frac{\operatorname{Subst}\left (\int \frac{(b+a x)^2}{(1-x)^3} \, dx,x,\cos ^2(e+f x)\right )}{2 f}\\ &=-\frac{\operatorname{Subst}\left (\int \left (-\frac{(a+b)^2}{(-1+x)^3}-\frac{2 a (a+b)}{(-1+x)^2}-\frac{a^2}{-1+x}\right ) \, dx,x,\cos ^2(e+f x)\right )}{2 f}\\ &=\frac{a (a+b) \csc ^2(e+f x)}{f}-\frac{(a+b)^2 \csc ^4(e+f x)}{4 f}+\frac{a^2 \log (\sin (e+f x))}{f}\\ \end{align*}
Mathematica [A] time = 0.260646, size = 77, normalized size = 1.51 \[ -\frac{\left (a \cos ^2(e+f x)+b\right )^2 \left (-4 a^2 \log (\sin (e+f x))+(a+b)^2 \csc ^4(e+f x)-4 a (a+b) \csc ^2(e+f x)\right )}{f (a \cos (2 (e+f x))+a+2 b)^2} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.06, size = 87, normalized size = 1.7 \begin{align*} -{\frac{{a}^{2} \left ( \cot \left ( fx+e \right ) \right ) ^{4}}{4\,f}}+{\frac{{a}^{2} \left ( \cot \left ( fx+e \right ) \right ) ^{2}}{2\,f}}+{\frac{{a}^{2}\ln \left ( \sin \left ( fx+e \right ) \right ) }{f}}-{\frac{ab \left ( \cos \left ( fx+e \right ) \right ) ^{4}}{2\,f \left ( \sin \left ( fx+e \right ) \right ) ^{4}}}-{\frac{{b}^{2}}{4\,f \left ( \sin \left ( fx+e \right ) \right ) ^{4}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.06555, size = 82, normalized size = 1.61 \begin{align*} \frac{2 \, a^{2} \log \left (\sin \left (f x + e\right )^{2}\right ) + \frac{4 \,{\left (a^{2} + a b\right )} \sin \left (f x + e\right )^{2} - a^{2} - 2 \, a b - b^{2}}{\sin \left (f x + e\right )^{4}}}{4 \, f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 0.520697, size = 242, normalized size = 4.75 \begin{align*} -\frac{4 \,{\left (a^{2} + a b\right )} \cos \left (f x + e\right )^{2} - 3 \, a^{2} - 2 \, a b + b^{2} - 4 \,{\left (a^{2} \cos \left (f x + e\right )^{4} - 2 \, a^{2} \cos \left (f x + e\right )^{2} + a^{2}\right )} \log \left (\frac{1}{2} \, \sin \left (f x + e\right )\right )}{4 \,{\left (f \cos \left (f x + e\right )^{4} - 2 \, f \cos \left (f x + e\right )^{2} + f\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.39903, size = 474, normalized size = 9.29 \begin{align*} -\frac{64 \, a^{2} \log \left (-\frac{\cos \left (f x + e\right ) - 1}{\cos \left (f x + e\right ) + 1} + 1\right ) - 32 \, a^{2} \log \left (-\frac{\cos \left (f x + e\right ) - 1}{\cos \left (f x + e\right ) + 1}\right ) + \frac{12 \, a^{2}{\left (\cos \left (f x + e\right ) - 1\right )}}{\cos \left (f x + e\right ) + 1} + \frac{8 \, a b{\left (\cos \left (f x + e\right ) - 1\right )}}{\cos \left (f x + e\right ) + 1} - \frac{4 \, b^{2}{\left (\cos \left (f x + e\right ) - 1\right )}}{\cos \left (f x + e\right ) + 1} + \frac{a^{2}{\left (\cos \left (f x + e\right ) - 1\right )}^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} + \frac{2 \, a b{\left (\cos \left (f x + e\right ) - 1\right )}^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} + \frac{b^{2}{\left (\cos \left (f x + e\right ) - 1\right )}^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} + \frac{{\left (a^{2} + 2 \, a b + b^{2} + \frac{12 \, a^{2}{\left (\cos \left (f x + e\right ) - 1\right )}}{\cos \left (f x + e\right ) + 1} + \frac{8 \, a b{\left (\cos \left (f x + e\right ) - 1\right )}}{\cos \left (f x + e\right ) + 1} - \frac{4 \, b^{2}{\left (\cos \left (f x + e\right ) - 1\right )}}{\cos \left (f x + e\right ) + 1} + \frac{48 \, a^{2}{\left (\cos \left (f x + e\right ) - 1\right )}^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}}\right )}{\left (\cos \left (f x + e\right ) + 1\right )}^{2}}{{\left (\cos \left (f x + e\right ) - 1\right )}^{2}}}{64 \, f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]